export interface StudentInfo {
  id: string;
  name: string;
  studentId: string;
  className: string;
  avatar?: string;
  major: string;
  grade: string;
  email?: string;
  phone?: string;
}

export interface CourseInfo {
  id: string;
  name: string;
  teacherName: string;
  semester: string;
  schedule: string;
  classroom: string;
  credit: number;
  description?: string;
}

export interface ExamInfo {
  id: string;
  name: string;
  courseId: string;
  startTime: string;
  endTime: string;
  duration: number;
  totalScore: number;
  status: "upcoming" | "ongoing" | "completed";
  score?: number;
  rank?: number;
}

export interface HomeworkInfo {
  id: string;
  title: string;
  courseId: string;
  deadline: string;
  description: string;
  attachments?: {
    name: string;
    url: string;
  }[];
  status: "pending" | "submitted" | "graded";
  score?: number;
  feedback?: string;
}

export interface LearningResource {
  id: string;
  title: string;
  type: "document" | "video" | "link" | "other";
  url: string;
  description?: string;
  uploadTime: string;
  size?: number;
  format?: string;
}

export interface LearningProgress {
  courseId: string;
  attendance: {
    total: number;
    present: number;
    late: number;
    absent: number;
  };
  homework: {
    total: number;
    submitted: number;
    graded: number;
    averageScore: number;
  };
  exams: {
    total: number;
    completed: number;
    averageScore: number;
    ranking: number;
  };
  knowledgePoints: {
    [key: string]: {
      mastery: number;
      recentTrend: number[];
      needsImprovement: boolean;
    };
  };
}

export interface Notification {
  id: string;
  title: string;
  content: string;
  type: "homework" | "exam" | "course" | "system";
  time: string;
  read: boolean;
  link?: string;
}

export interface Discussion {
  id: string;
  courseId: string;
  title: string;
  content: string;
  author: {
    id: string;
    name: string;
    avatar?: string;
    role: "student" | "teacher";
  };
  createTime: string;
  replies: {
    id: string;
    content: string;
    author: {
      id: string;
      name: string;
      avatar?: string;
      role: "student" | "teacher";
    };
    createTime: string;
  }[];
  tags?: string[];
}
